'use strict';

const brandManagementController = require('../../controllers/brandManagement');

module.exports = (app, router) => {
  // 获取商标列表
  app.fs.api.logAttr['GET/brandManagement/list'] = {
    content: '获取商标列表',
  };
  router.get('/brandManagement/list',  brandManagementController.getTrademarkList);

  // 导出商标
  app.fs.api.logAttr['GET/brandManagement/export'] = {
    content: '导出商标',
  };
  router.get('/brandManagement/export', brandManagementController.exportTrademark);

  // 批量删除商标
  app.fs.api.logAttr['POST/brandManagement/batch-delete'] = {
    content: '批量删除商标',
  };
  router.post('/brandManagement/batch-delete', brandManagementController.batchDeleteTrademark);

  // 导入商标
  app.fs.api.logAttr['POST/brandManagement/import'] = {
    content: '导入商标',
  };
  router.post('/brandManagement/import', brandManagementController.importTrademark);

  // 获取商标详情 (通用路由放在特定路由后面)
  app.fs.api.logAttr['GET/brandManagement/:id'] = {
    content: '获取商标详情',
  };
  router.get('/brandManagement/:id', brandManagementController.getTrademarkDetail);

  // 添加商标
  app.fs.api.logAttr['POST/brandManagement'] = {
    content: '添加商标',
  };
  router.post('/brandManagement', brandManagementController.addTrademark);

  // 更新商标
  app.fs.api.logAttr['PUT/brandManagement/:id'] = {
    content: '更新商标',
  };
  router.put('/brandManagement/:id', brandManagementController.updateTrademark);

  // 删除商标
  app.fs.api.logAttr['DELETE/brandManagement/:id'] = {
    content: '删除商标',
  };
  router.delete('/brandManagement/:id', brandManagementController.deleteTrademark);
}; 